package org.crackjack.android.activity;

import org.crackjack.android.R;
import org.crackjack.android.model.Appointment;

import android.os.Bundle;
import android.widget.TextView;

public class AppointmentActivity extends GenericActivity {

    private TextView appointmentName;
    private TextView appointmentRating;
    private TextView appointmentDescription;
    private TextView appointmentCategory;
    private TextView appointmentOwner;

    private Appointment appointment;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.activity_appointment);

        appointmentName = (TextView) findViewById(R.id.txv_appointment_name);
        appointmentRating = (TextView) findViewById(R.id.txv_appointment_rating);
        appointmentDescription = (TextView) findViewById(R.id.txv_appointment_description);
        appointmentOwner = (TextView) findViewById(R.id.txv_appointment_owner);
        appointmentCategory = (TextView) findViewById(R.id.txv_appointment_category);

        appointment = getIntent().getParcelableExtra("appointment");

        appointmentName.setText(appointment.getName());
        appointmentRating.setText(appointment.getRating().toString());
        appointmentDescription.setText(appointment.getDescription());
        appointmentOwner.setText(appointment.getAppointmentOwner().getLogin());
        appointmentCategory.setText(appointment.getCategory().getName());

    }

}
